package com.sunnada.edu.system.pub.service;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.lang.StringUtils;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
import org.springframework.stereotype.Service;
import org.springframework.transaction.TransactionDefinition;
import org.springframework.transaction.TransactionStatus;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.support.DefaultTransactionDefinition;
import org.springframework.web.multipart.MultipartFile;

import com.sunnada.edu.business.attendance.dao.AttenRecordDao;
import com.sunnada.edu.system.pub.common.AppContext;
import com.sunnada.edu.system.pub.common.EXCELObject;
import com.sunnada.edu.system.pub.common.MD5;
import com.sunnada.edu.system.pub.common.RandomTool;
import com.sunnada.edu.system.pub.dao.AppAttendanceDao;
import com.sunnada.edu.system.pub.dao.PubDao;
import com.sunnada.edu.system.pub.service.RandomGUID;
import com.sunnada.edu.system.pub.util.DateUtil;
import com.sunnada.edu.system.pub.util.Utils;

@Service
@Transactional
public class AppAttendanceServiceImpl implements AppAttendanceService {
	private static final Logger logger = LoggerFactory.getLogger(AppAttendanceServiceImpl.class);
	@Resource
	AppAttendanceDao appAttendanceDao;

	@Override
	public String appAttendanceAdd(HashMap<String, String> params) {
		String msg = "";
			int num = appAttendanceDao.appAttendanceAdd(params);
			if (num == 0) {
				msg = "0";// 失败
			} else {
				msg = "1";// 成功
			}

		return msg;
	}


}
